
{include file="public/header"}
<link href="__TEMPLATE__/mobile/index/css/login.css" rel="stylesheet" type="text/css">
<link href="__TEMPLATE__/sysme/css/layer.css" rel="stylesheet" type="text/css" />
<link href="__TEMPLATE__/mobile/index/css/pulic.css" rel="stylesheet" type="text/css">
<script src="__TEMPLATE__/sysme/js/layer.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="__SYSMET__/lib/Hui-iconfont/1.0.8/iconfont.css" />
</head>
<style type="text/css">
	html,body{padding:0;margin:0;}
	.header_top{height:44px;position:relative;}
	.header_top p{text-align: center;line-height:44px;font-size:15px;}
	.header_top i{position:absolute;top:5px;left:15px;font-size:23px;}
    #tsk{width:200px;height:150px;display:none;background:#fff;position:absolute;top:200px;left:50%;margin-left:-100px;border-radius: 5px;text-align: center;font-size:14px;z-index: 1111;}
    #ts{width:60px;height:30px;position:absolute;bottom:10px;left:50%;margin-left:-25px;background:#e7aea6;line-height:30px;border-radius: 4px;color:#fff;z-index: 22222;}
    #tsk p{width:160px;height:70px;position:absolute;top:0;right:0;left:0;bottom:0;margin:auto;text-align: center;color:#f00;font-weight:bold;z-index: 111111;padding:0 10px;}
    .content{width:88%;margin:0 auto;}
    .content>div{width:100%;height:50px;line-height:50px;}
    .content>div .tu{margin-right:12px;width:20px;margin-top:12.5px;}
    .content>div input{border:none;height:50px;background:none;}
    ::-webkit-input-placeholder{font-size:14px;color:#cecece;}
    .sudg{width:80%;margin:20px auto;text-align: center;height:40px;line-height:40px;background:red;color:#fff;border-radius: 4px;}
     .change_h::-webkit-input-placeholder {
                    color: red;
                    font-size:14px;
     }
     .change_q::-webkit-input-placeholder {
                    color: gray;
     }
     .login_bo{width:auto;text-align: center;font-size: 12px;}
     .login_bo a{font-size:12px;color:#666;}

   #tsk{width:200px;height:150px;display:none;background:#fff;position:absolute;top:200px;left:50%;margin-left:-100px;border-radius: 5px;text-align: center;font-size:14px;z-index: 1111;}
    #ts{width:60px;height:30px;position:absolute;bottom:10px;left:50%;margin-left:-25px;background:#e7aea6;line-height:30px;border-radius: 4px;color:#fff;}
    #tsk p{width:160px;height:70px;position:absolute;top:0;right:0;left:0;bottom:0;margin:auto;text-align: center;color:#f00;font-weight:bold;padding: 0px 20px 10px;}
	 #reveal-left {
    background: url(__TEMPLATE__/mobile/index/img/blank_01.png) no-repeat;
    background-size: 42.5px;
    height: 44px;
    width: 42.5px;
    height: 44px;
    display: block;
    border: none; 
}
.biaoda1 {
    border-radius: 0px 0px 5px 5px;
    margin: 0 7px;
}



.tb_input{position:relative;width:100%;}
.tb_input input{padding-left:0;text-indent:10px;}
.tb_input span{width:145px;height:42px;position:absolute;right:-25px;top:0;display:none;line-height:42px;color:red;font-size:12px;background:#fff;text-align: center;font-weight: bold;}

.ind {
    margin-top: 12px;
}
.change_h::-webkit-input-placeholder {
                color: red;
                font-size:14px;
 }
 .change_q::-webkit-input-placeholder {
                color: gray;
 }
 .tb_input {
    position: relative;
    width: 88%;
    border-bottom: 1px solid #e5e5e5;
}
.tb_input input {
    padding-left: 0;
    text-indent: 10px;
    margin-top: -1px;
}

 input::-webkit-input-placeholder{
            color:#cccccc;
        }
        input::-moz-placeholder{   /* Mozilla Firefox 19+ */
            color:#cccccc;
        }
        input:-moz-placeholder{    /* Mozilla Firefox 4 to 18 */
            color:#cccccc;
        }
        input:-ms-input-placeholder{  /* Internet Explorer 10-11 */ 
            color:#cccccc;
        }
        
   #reveal-left {
    background: url(/static/template/mobile/index/img/zhuce_fh.png) no-repeat;
    background-size: 42.5px;
    height: 44px;
    width: 42.5px;
    height: 44px;
    display: block;
    border: none;
    background-size: 25px;
}
.ui-toolbar-left {
     background: none; 
     padding-top: 6px;
     padding-left: 6px;
}

.yzm_b::-webkit-input-placeholder{
            color:#888;
        }
        .yzm_b::-moz-placeholder{   /* Mozilla Firefox 19+ */
            color:#888;
        }
        .yzm_b:-moz-placeholder{    /* Mozilla Firefox 4 to 18 */
            color:#888;
        }
      .yzm_b:-ms-input-placeholder{  /* Internet Explorer 10-11 */ 
            color:#888;
        }
        
        .yhxy_b{
        	display: block;
        }
        .yhxy_n{
        	display: none;
        }
        	.header_top{height:44px;position:relative;}
	.header_top p{text-align: center;line-height:44px;font-size:15px;}
	.header_top i{position:absolute;top:5px;left:15px;font-size:23px;}
    #tsk{width:200px;height:150px;display:none;background:#fff;position:absolute;top:200px;left:50%;margin-left:-100px;border-radius: 5px;text-align: center;font-size:14px;z-index: 1111;}
    #ts{width:60px;height:30px;position:absolute;bottom:10px;left:50%;margin-left:-25px;background:#e7aea6;line-height:30px;border-radius: 4px;color:#fff;z-index: 22222;}
    #tsk p{width:160px;height:70px;position:absolute;top:0;right:0;left:0;bottom:0;margin:auto;text-align: center;color:#f00;font-weight:bold;z-index: 111111;padding:0 10px;}
    .content{width:88%;margin:0 auto;}
    .content>div{width:100%;height:50px;line-height:50px;}
    .content>div .tu{margin-right:12px;width:20px;margin-top:12.5px;}
    .content>div input{border:none;height:50px;background:none;}
    ::-webkit-input-placeholder{font-size:14px;color:#cecece;}
    .sudg{width:80%;margin:20px auto;text-align: center;height:40px;line-height:40px;background:red;color:#fff;border-radius: 4px;}
     .change_h::-webkit-input-placeholder {
                    color: red;
                    font-size:14px;
     }
     .change_q::-webkit-input-placeholder {
                    color: gray;
     }
     .login_bo{width:auto;text-align: center;font-size: 12px;}
     .login_bo a{font-size:12px;color:#666;}

</style>
<script>
	

function CheckLogin() {
	
            var usernName = $("#txtUserName").val().replace(/\s/g, "");
            $("#txtUserName").val(usernName);//将去除空格的用户名，写入登录框中
            var password = $("#txtPwd").val().trim();
            var code = $("#login_code_input").val().trim();
        
        if($("#txtUserName").val()==''){
        	$("#txtUserName").attr('placeholder','用户名不能为空')
        	$("#txtUserName").removeClass('change_q')
        	$("#txtUserName").addClass('change_h')
        	
        	return
        }else{
        	$("#txtUserName").attr('placeholder','用户名')
        	$("#txtUserName").removeClass('change_h')
        	$("#txtUserName").addClass('change_q')
        }
        
        
        if($("#txtPwd").val()==''){
        	
        	$("#txtPwd").attr('placeholder','密码不能为空')
        	$("#txtPwd").removeClass('change_q')
        	$("#txtPwd").addClass('change_h')
        	return
        }else{
        	$("#txtPwd").attr('placeholder','密码')
        	$("#txtPwd").removeClass('change_g')
        	$("#txtPwd").addClass('change_q')
        }
        
         if($("#login_code_input").val()==''){
         	$("#login_code_input").attr('placeholder','验证码不能为空')
         	$("#login_code_input").removeClass('change_q')
        	$("#login_code_input").addClass('change_h')
        	
        	return
        }else{
        	$("#login_code_input").attr('placeholder','验证码')
        	$("#txtPwd").removeClass('change_h')
        	$("#login_code_input").addClass('change_q')
        }
      if($("#txtUserName").val()==''||$("#txtPwd").val()==''||$("#login_code_input").val()==''){

        }else{
            $.ajax({
                type: "POST",
                url: "{:url('pocessing/login')}",
                data:{'username':usernName,'password':password,"code":code},
                success: function (data) {

                  if (data == 1) {
                  
                    window.location.href = "/mobile/index/mhome";
                  }
                  if (data == 2) {
                  
                       
	            $('#ji').css('display','block');
		    	$('#ti_nr').css('display','block');
		    	$('#ti_nr').html('请输入正确的用户名或密码');
		    	refreshVerify();
		    	$("#login_code_input").val('');
		    	setTimeout(function(){
				$('#ji').css('display','none')
		    	$('#ti_nr').css('display','none')
			},2000);
			           
		           return false
                  }  
                  if (data == 3) {
                     
			           $('#ji').css('display','block')
    	$('#ti_nr').css('display','block')
    	$('#ti_nr').html('您的账户当前处于锁定状态，请联系客服！')
    	setTimeout(function(){
		$('#ji').css('display','none')
    	$('#ti_nr').css('display','none')
	},2000);
                    return false;
                  } 
                  if (data == 9) {
                      
			           $('#ji').css('display','block')
				   	$('#ti_nr').css('display','block')
				   	$('#ti_nr').html('此账户已被注销，请联系客服！')
				   	setTimeout(function(){
						$('#ji').css('display','none')
				   	$('#ti_nr').css('display','none')
					},2000);
                   return false;
                 } 
                  if (data == 4) {
                  	$('#login_code_input').val('')
                    $('#login_code_input').attr('placeholder','验证码无效')
	        	    $('#login_code_input').addClass('change_h')
	        	    $('#login_code_input').removeClass('change_q')
	        	     $('#login_code_input').focus()
                  }
                  $("#login_code_input").val('');
                  refreshVerify();
                }
            });

        }
  
            
        }


//刷新验证码

function refreshVerify() {
	$("#login_code_input").val('');
    var ts = Date.parse(new Date()) / 1000;
    $('#verify_img').attr("src", "{:url('Index/verify')}?id="+ts);
}
</script>

<body>
<div id="ji" style="width:250px;height:40px;position:fixed;top:0;right:0;left:0;bottom:0;margin:auto;opacity: .7;background: #000;border-radius: 4px;display:none;z-index:1111;">
	
</div>
<div id="ti_nr" style="width:250px;height:40px;line-height:40px;text-align:center;
	position:fixed;display:none;top:0;font-size:12px;right:0;left:0;bottom:0;margin:auto;color:#fff;z-index: 11112;"></div>
 <div class="header_top">
	<i class="Hui-iconfont" onclick="history.go(-1)">&#xe6a6;</i>
	<p>赢彩彩票登录</p>
</div>

<!--<div class="login_bg" style="background:url(/static/attachment/{$login_bj.gg_img});background-size: 100% 100%;">
<div class="logo"></div></div>-->


 <div id="tsk">
  <p id="tsy"></p>
    <div id="ts">确定</div>
</div>
<div class="biaoda1" style="margin-top: 40px;">
  <div class="biaoda_input">

  	
    <div class="login_input">
	<div style="float: left;width: 10%;font-size: 15px;margin-top:4px;">
		<img style="width:20px;" class="tu"  src="__TEMPLATE__/mobile/index/img/user.png" alt=""/>
	</div>
	  <div class="tb_input"><input name="txtUserName"  id="txtUserName" type="text" placeholder="6-16位 由字母或数字组成" style=""/></div>
	</div>
	<div class="login_input ind">
	<div style="float: left;width: 10%;font-size: 15px;margin-top:4px;">
		<img style="width:20px;" style="float:left;" class="tu" src="__TEMPLATE__/mobile/index/img/pass.png" alt=""/>
	</div>
	  <div class="tb_input" style="position:relative;"><input style="width:80%;" name="txtPwd" id="txtPwd" type="password" placeholder="6-16位 由字母或数字组成" /><i id="eye" style="float:right;background:url(__TEMPLATE__/mobile/index/img/hide_pass.png) no-repeat;width:30px;height:18px;background-size:contain;margin-top:12px;margin-right:15px;"></i></div>
	</div>
	
	
	
   
	  <div class="tb_input" style="width: 55%;margin-right: 15px;margin-top:20px;"><input class="yzm_b" style="background-color: #eeeeee;border-radius: 3px;" name="login_code_input" id="login_code_input" type="number" placeholder="请输入验证码"/></div>
	  <div style="display: inline-block;width: 40%;margin-top:20px;"><img style="height: 43px;" id="verify_img" alt="captcha" src="{:url('Index/verify')}" onclick="refreshVerify()" /></div>
	</div>
	<div style="overflow: hidden;">
 	<p id="forget" style="float:right;margin-right:0px;margin-top:15px;color:#cecece;font-size:14px;">忘记密码？</p>
 </div>
   <div class="sudg" onclick="CheckLogin()">登录</div>
  <div class="login_bo">
  	<a id="sw" href="javascript:;">免费试玩</a>&nbsp;|
	<a href="{:url('User/register')}">账号注册</a>
  </div>
</div>


</body>
</html>

<script type="text/javascript">

	
    $("#txtUserName").blur(function(){
        if($(this).val()==''){
        	$(this).attr('placeholder','用户名不能为空')
        	$(this).addClass('change_h')
        	$(this).removeClass('change_q')
        	
        }else{
        	$(this).attr('placeholder','用户名')
        	$(this).removeClass('change_h')
        	$(this).addClass('change_q')
        }
  
        
    })
     $("#txtPwd").blur(function(){
     	if($(this).val()==''){
     		$(this).attr('placeholder','密码不能为空')
     		$(this).removeClass('change_q')
        	$(this).addClass('change_h')
        	
     	}else{
     		$(this).attr('placeholder','密码')
     		$(this).removeClass('change_h')
     		$(this).addClass('change_q')
     	}

    })
    $("#login_code_input").blur(function(){

      if($(this).val()==''){
     		$(this).attr('placeholder','验证码不能为空')
     		$(this).removeClass('change_q')
        	$(this).addClass('change_h')
     	}else{
     		$(this).attr('placeholder','验证码')
     		$(this).removeClass('change_h')
     		$(this).addClass('change_q')
     	}
        
    })
   var shiwan = true;
   $('#sw').click(function(){
	   if(shiwan == false) return;
		shiwan = false;
   		$.ajax({
                type: "GET",
         url: "{:url('pocessing/shiwan')}",
         success: function (data) {
                 if(data=='sw') {
                 	$('#ji').css('display','block')
			    	$('#ti_nr').css('display','block')
			    	$('#ti_nr').html('申请成功')
			    	setTimeout(function(){
			    		$('#ji').css('display','none')
			    	    $('#ti_nr').css('display','none')
			    	    window.location.href = "/mobile/index/mhome";
                        shiwan = true;
			    	
			     },2000)
                 
                }else{
                	$('#ji').css('display','block')
			    	$('#ti_nr').css('display','block')
			    	$('#ti_nr').html('系统未开启试玩功能')
			    	setTimeout(function(){
			    		$('#ji').css('display','none')
			    	    $('#ti_nr').css('display','none')
                        shiwan = true;
			    	
			     },2000)
               	 
                }
       }
     })
   })
   
    
    $('#forget').click(function(){
    	$('#ji').css('display','block')
    	$('#ti_nr').css('display','block')
    	$('#ti_nr').html('请联系在线客服找回密码')
    	setTimeout(function(){
    		$('#ji').css('display','none')
    	$('#ti_nr').css('display','none')
	},2000);
    })
    var eye=true
    $('#eye').click(function(){
    	if(eye){
    		$('#eye').css({'background':'url(__TEMPLATE__/mobile/index/img/show_pass.png) no-repeat','background-size':'contain'})
    		$('#txtPwd').attr('type','text')
    		eye=!eye
    	}else{
    		$('#eye').css({'background':'url(__TEMPLATE__/mobile/index/img/hide_pass.png) no-repeat','background-size':'contain'})
    		$('#txtPwd').attr('type','password')
    		eye=!eye
    	}
    })

</script>

